﻿@model yq.Model.Logic.TeamList
@Url.Css("Css/metro/css/list.css")
@Url.Script("Scripts/metro/info.js")
@Url.UploadScript()

<script>
    function OnSuccessForm(obj) {

        if (obj.Status == 1) {
            $.confim("您需要继续添加吗？", function () {
                window.location = window.location;
            }, function () {
                window.location = '@(Url.Action("Index"))';
            });
        } else {
            $.tips(obj.ErrorText);
        }
    }
</script>

<div id="container" class="container">
    @Html.Action("Navigation", "Home")
    @Html.Action("RowLeft", "PublicReuse", new { Area = "Home", back = true })
    <div id="container_r" class="container_right">
        @Html.Action("HeadTitle", "PublicReuse", new { Area = "Home" })
        <div class="icodiv">
        </div>
        <div class="span8" style="padding-top: 30px">
            @using (Ajax.BeginForm("DoAddTeam", new { }, new AjaxOptions { OnSuccess = "OnSuccessForm" }, new { @class = "form-horizontal", novalidate = "novalidate" }))
            { 
                <fieldset>
                   @* <div class="alert alert-info" style="margin-top: 0px; margin-bottom: 20px; text-align: left">
                        添加团队
                    </div>*@
                    <div class="control-group">
                        <div>
                            <label class="control-label">@Html.RawFor(obj => obj.Title)</label>
                            <div class="controls">
                                @Html.TextBoxFor(obj => obj.Title)
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="disabledInput">
                            @Html.RawFor(obj => obj.Detailed)</label>
                        <div class="controls">
                            @Html.TextAreaFor(obj => obj.Detailed, new { style = " width:300px; height:100px" })
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="optionsCheckbox2">
                            @Html.RawFor(obj => obj.ImageId)</label>
                        <div class="controls">
                               @Html.ImgFile(Model.ImageId, 100, 100, 100, new { id = "ImgFileLogo" })
                            @Html.UploadFor(obj => obj.ImageId, new UploadConfig() { Callback = "ImgFileLogofun" }, UploadType.Img, "teamLogo")
                            <script>
                                function ImgFileLogofun() {
                                    $("#ImgFileImage").hide();
                                }
                            </script>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                        </label>
                        <div class="controls">
                            @Html.Submit(" 保 存 ")
                        </div>
                    </div>
                </fieldset>  
            }
        </div>
    </div>
</div>
